﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using System.Data.SqlClient;
using System.Data;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void ibLogin_Click(object sender, ImageClickEventArgs e)
    {
        string id = ((TextBox)LoginView1.FindControl("txtId")).Text;

        string pwd = ((TextBox)LoginView1.FindControl("txtPwd")).Text;

        if (Membership.ValidateUser(id, pwd))
        {
            FormsAuthentication.RedirectFromLoginPage(id, false);
        }
        else
        {
            //
        }
    }
    protected void iblogout_Click(object sender, ImageClickEventArgs e)
    {
        FormsAuthentication.SignOut();
        Response.Redirect("~/Default.aspx");
    }
}
